package com.vanguard.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.vanguard.commons.base.BaseDomain;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import javax.persistence.*;

/**
 * @Title: 预约实体类
 * @Description:
 * @Author: vanguard
 * @Version: 1.0
 * @Date: 2018/11/19
 */
@Table(name = "tb_appointment")
public class Appointment extends BaseDomain {

    /**
     * 微信用户的openId
     */
    @Column(name = "open_id")
    private String openId;

    /**
     * 项目Id
     */
    @Column(name = "project_id")
    private Integer projectId;

    /**
     * 预约时间
     */
    @Column(name = "appoint_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date appointTime;

    /**
     * 申请时间
     */
    @Column(name = "apply_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date applyTime;

    /**
     * 备注
     */
    private String remark;

    /**
     * 申请状态
     */
    @Column(name = "apply_status")
    private Integer applyStatus;

    /**
     * 获取微信用户的openId
     *
     * @return open_id - 微信用户的openId
     */
    public String getOpenId() {
        return openId;
    }

    /**
     * 设置微信用户的openId
     *
     * @param openId 微信用户的openId
     */
    public void setOpenId(String openId) {
        this.openId = openId;
    }

    /**
     * 获取项目Id
     *
     * @return project_id - 项目Id
     */
    public Integer getProjectId() {
        return projectId;
    }

    /**
     * 设置项目Id
     *
     * @param projectId 项目Id
     */
    public void setProjectId(Integer projectId) {
        this.projectId = projectId;
    }

    /**
     * 获取预约时间
     *
     * @return appoint_time - 预约时间
     */
    public Date getAppointTime() {
        return appointTime;
    }

    /**
     * 设置预约时间
     *
     * @param appointTime 预约时间
     */
    public void setAppointTime(Date appointTime) {
        this.appointTime = appointTime;
    }

    /**
     * 获取申请时间
     *
     * @return apply_time - 申请时间
     */
    public Date getApplyTime() {
        return applyTime;
    }

    /**
     * 设置申请时间
     *
     * @param applyTime 申请时间
     */
    public void setApplyTime(Date applyTime) {
        this.applyTime = applyTime;
    }

    /**
     * 获取备注
     *
     * @return remark - 备注
     */
    public String getRemark() {
        return remark;
    }

    /**
     * 设置备注
     *
     * @param remark 备注
     */
    public void setRemark(String remark) {
        this.remark = remark;
    }

    /**
     * 获取申请状态
     *
     * @return apply_status - 申请状态
     */
    public Integer getApplyStatus() {
        return applyStatus;
    }

    /**
     * 设置申请状态
     *
     * @param applyStatus 申请状态
     */
    public void setApplyStatus(Integer applyStatus) {
        this.applyStatus = applyStatus;
    }
}